#ifndef PAGE_LOGIN_H
#define PAGE_LOGIN_H

#include "admsql.h"

#include <QWidget>
namespace Ui {
class Page_login;
}

class Page_login : public QWidget
{
    Q_OBJECT

public:
    explicit Page_login(QWidget *parent = nullptr);
    ~Page_login();
private:
    QString emailcode;

private slots:
    void on_btn_login_clicked();
    void on_btn_to_enrol_clicked();
    void on_btn_to_login_clicked();
    void on_btn_enrol_clicked();
    void on_pb_get_code_clicked();
    void on_pb_get_code2_clicked();
    QString create_adminId();
    bool isEmailValid(const QString& email);
    void hideKey();
    void on_tb_eye_clicked(bool checked);
    void on_btn_reset_clicked();
    void on_pb_exit_clicked();
    void on_btn_to_reset_clicked();

signals:
    void sendLoginSuccess(const AdmInfo &adminInfo);
    void pagetologin();
    void pagetoenrol();
    void sendEnrolSuccess();

private:
    Ui::Page_login *ui;
};

#endif // PAGE_LOGIN_H
